package edu.sctu.practice.class01.fengleilin.assign03.test01;

/**
 * Created by fll on 2015/10/22.
 */

/**
 * Circle为子类，表示一个圆
 */
public class Circle extends GeometricObject {

    double PI = 3.14;//定义PI的变量
    double radius;//定义圆的半径

    /**
     * 构造方法
     *
     * @param color
     */
    public Circle(String color) {
        super(color);
    }

    @Override
    public double findArea() {
        double object2 = PI * radius * radius;
        System.out.println(object2);
        return object2;
    }

    @Override
    public double findPerimeter() {
        double circlePerimeter = 2 * PI * radius;
        System.out.println(circlePerimeter);
        return circlePerimeter;
    }
}
